package com.slz3.business.module.memberManagement.memThirdLoginInfo.ApiVo;

import org.json.JSONException;
import org.json.JSONObject;

import java.io.Serializable;

public class ThirdUserVo implements Serializable {
    private static final long serialVersionUID = -6508238590166335028L;
    /**
     * 用户id
     */
    private String uid = "";

    private String openid = "";

    private String picture = "";

    private String userName = "";

    private String city_name = "";

    /**
     * 类型 0： 未知 1： 男 2：女
     */
    private Integer sex = 0;
    /**
     * 第三方登录类型 0：支付宝 1： 微信 2：微博
     */
    private Integer type = 0;

    private String id = "";

    private String token = "";

    private Integer typeNew = 0;

    public Integer getTypeNew() {
        return typeNew;
    }

    public void setTypeNew(Integer typeNew) {
        this.typeNew = typeNew;
    }

    public String getToken() {
        return token;
    }

    public void setToken(String token) {
        this.token = token;
    }

    public String getCity_name() {
        return city_name;
    }

    public void setCity_name(String cityName) {
        city_name = cityName;
    }

    public String getUid() {
        return uid;
    }

    public void setUid(String uid) {
        this.uid = uid;
    }

    public String getOpenid() {
        return openid;
    }

    public void setOpenid(String openid) {
        this.openid = openid;
    }

    public String getPicture() {
        return picture;
    }

    public void setPicture(String picture) {
        this.picture = picture;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public Integer getSex() {
        return sex;
    }

    public void setSex(Integer sex) {
        this.sex = sex;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public JSONObject toJSON() throws JSONException {
        JSONObject json = new JSONObject();
        json.put("uid", uid == null ? 0 : uid);
        json.put("openid", openid == null ? 0 : openid);
        json.put("picture", picture == null ? "" : picture);
        json.put("userName", userName == null ? "" : userName);
        json.put("sex", sex == null ? 0 : sex);
        json.put("type", type == null ? 0 : type);
        json.put("id", id == null ? 0 : id);
        json.put("token", token == null ? "" : token);
        return json;
    }

    public JSONObject toJSON1() throws JSONException {
        JSONObject json = new JSONObject();
        json.put("id", uid == null ? 0 : uid);
        json.put("openid", openid == null ? 0 : openid);
        json.put("picture", picture == null ? "" : picture);
        json.put("userName", userName == null ? "" : userName);
        json.put("sex", sex == null ? 0 : sex);
        json.put("type", type == null ? 0 : type);
        json.put("thirdId", id == null ? 0 : id);
        json.put("token", token == null ? "" : token);
        json.put("typeNew", typeNew == null ? "" : typeNew);
        return json;
    }
}